package es.deusto.ingenieria.aike.puzzle;

import java.awt.Point;

public class Tile extends Point {
	
	private char cross;
	private int column;
	private int row;

	public Tile()
	{
		
	}
	public Tile(int row, int column)
	{
		super(row, column);
	}
	
	public Tile(int row, int column, char cross)
	{
		super(row, column);
		this.cross = cross;
	}
	
	public char getCross() {
		return cross;
	}

	public void setCross(char cross) {
		this.cross = cross;
	}

	public void setRow(int row) {
		this.y = row;
	}
	
	public int getRow() {
		return this.y;
	}
	
	public void setColumn(int column) {
		this.x = column;
	}
	
	public int getColumn() {
		return this.x;
	}
	
	public boolean equals(Object obj) {
		boolean result = false;
		if (obj != null	&& obj instanceof Tile) 
		{
			Tile tileTemp = (Tile)obj;
			if (tileTemp.cross == this.cross &&
					tileTemp.column == this.column &&
						tileTemp.row == this.row)
				result = true;
		} 
		return result;
	}
	
	public Point getPosition() {
		return this;
	}
}